package com.qdlc.p2p.biz.executer.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.qdlc.p2p.biz.executer.BaseExecuter;
import com.qdlc.p2p.biz.service.RateInterestService;
import com.qdlc.p2p.common.constant.Global;
import com.qdlc.p2p.common.util.BeanUtil;
import com.qdlc.p2p.dal.dto.BorrowTender;

/**
 * 投标使用加息券相关业务
 * @author wjx
 * @version 2.0
 * @date 2015年4月25日 上午9:40:22
 */
@Service
@Scope(value=ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class UseRateInterestExecuter extends BaseExecuter {

	@Resource
	private RateInterestService  rateInterestService;

	@Override
	public void extend() {
		long rateInterestId = Long.parseLong(Global.getTransfer().get("rateInterestId").toString());
		BorrowTender tender = (BorrowTender)Global.getTransfer().get("tender");
		rateInterestService = (RateInterestService)BeanUtil.getBean("rateInterestService");
		rateInterestService.tenderUseRateInte(tender, rateInterestId);
	}

}
